package org.example.controller;

import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.common.message.Message;
import org.apache.rocketmq.remoting.common.RemotingHelper;
import org.example.rocketmq.StudyProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description:
 * @Auther: wangyaomeng
 * @Date: 2021/1/18 17:15
 * @param:
 */
@Controller
@RequestMapping("/study")
public class StudyController {
    @Autowired
    private StudyProducer studyProducer;

    @RequestMapping("/send")
    public String send(){
        studyProducer.syncSend();
        return "success";
    }



}
